/**
 * @file:main.c
 * @author:liaowx
 * @date:2019.08.02
 */
#include <stdio.h>

#include "air_conditioning.h"

struct air_conditioning ON_OFF;
struct air_conditioning ON_ON;
struct air_conditioning REFRIGERATION;

int main()
{
    struct air_conditioning cur_state;
    cur_state.name = "OFF";
    state_init(&ON_OFF, "OFF", 24, 3);
    state_init(&ON_ON, "ON", 24, 3);
    state_init(&REFRIGERATION, "REFRIGERATION", 24, 3);

    run(&cur_state, OPEN, &ON_ON);
    run(&cur_state, MAKE_COLD, &REFRIGERATION);
    run(&cur_state, CLOSE, &ON_OFF);

    return 0;
}